program Table;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, x, y:array of integer;
  i, n, m, j:integer
  x0, y0: extended;
  fin: textFile;

begin
  x0:=0;
  y0:=0;
  assignFile(fin, 'input.txt');
  reset(fin);
  readln(fin, n, m);
  setlength(x, n);
  setlength(y, n);
  setlength(a, m);
  setlength(b, m);
  for i:=0 to n-1 do
  begin
    readln(fin, x[i],y[i]);
    x0:=x0+x[i];
    y0:=y0+y[i];
  end;
  x0:= x0/n;
  y0:= y0/n;
  for i:=0 to m-1 do
    readln(fin, a[i],b[i]);
  for i:=0 to m-1 do
  begin
    sum:=sum+x0*y[i]-x[i]*y0+x[i]*y[i+1 mod m-1]-x[i+1 mod m-1]*y[i]+x[i+1 mod m-1]*y0-x0*y[i+1 mod m-1];
    S2:=S2+x[i]*y[i+1 mod m-1]-x[i+1 mod m-1]*y[i]+x[i+1 mod m-1]*y[i+1 mod m-1]-x[i+2 mod m-1]*y[i+1 mod m-1]+x[i+2 mod m-1]*y[i]-x[i]*y[i+2 mod m-1];
  end;
  if sum=S2 then
    write('Yes')
  else
    write('No');
  readln:
end.
 